package com.mmt.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mmt.po.User;
import com.mmt.service.ConversationService;
import com.mmt.service.UserService;
import com.mmt.service.impl.UserServiceImpl;

@RestController
@RequestMapping("/UserController")
public class UserController {

	@Autowired
	private UserService userService;
	
	@RequestMapping("/getUserByIdByPass")
	public User getUserByIdByPass(Integer userId,String password) throws Exception{
		return userService.getUserByIdByPass(userId,password);
	}
	@RequestMapping("/listUserInfoByUserId")
	public User listUserInfoByUserId(Integer userId) throws Exception{
		return userService.listUserInfoByUserId(userId);
	}
	@RequestMapping("/saveUser")
	public int saveUser(User user) throws Exception{
		return userService.saveUser(user);
	}
	@RequestMapping("/updateUser")
	public int updateUser(User user) throws Exception{
		return userService.updateUser(user);
	}
}
 